﻿using System;

namespace eNets.IO.Binary;

public interface IBinaryReader
{
    long ReadableLength
    {
        get;
    }

    bool ReadBoolean();
    
    sbyte ReadInt8();
    byte ReadUInt8();
    
    short ReadInt16LE();
    short ReadInt16BE();
    
    ushort ReadUInt16LE();
    ushort ReadUInt16BE();
    
    int ReadInt32LE();
    int ReadInt32BE();
    
    uint ReadUInt32LE();
    uint ReadUInt32BE();
    
    long ReadInt64LE();
    long ReadInt64BE();
    
    ulong ReadUInt64LE();
    ulong ReadUInt64BE();
    
    float ReadFloat32LE();
    float ReadFloat32BE();
    
    double ReadFloat64LE();
    double ReadFloat64BE();
    
    char ReadChar();
    char ReadCharLE();
    char ReadCharBE();
    
    string ReadString();

    bool TryFindPosition(byte[] value, out SequencePosition lastPosition);
    bool TryFindPosition(byte value, out SequencePosition position);
}